feat(gastown): add gated Gastown and Wasteland token issuance - #6141
Open
pandemicsyn wants to merge 7 commits into
Open
pandemicsyn wants to merge 7 commits into
pandemicsyn wants to merge 7 commits into
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental Wasteland control-token consolidation onto the shared delegated-issuance helper, plus the merge of Files Reviewed (3 files)
Previous Review Summaries (2 snapshots, latest commit 4ed383e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4ed383e)Status: No Issues Found | Recommendation: Merge Executive SummaryThe incremental commits resolve the prior authorization findings for the gated Gastown token-issuance paths and introduce no new issues in the changed code. Files Reviewed (10 files)
Previous review (commit 72f248b)Status: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
SUGGESTION
Files Reviewed (34 files)
Reviewed by deepseek-v4.1-flash · Input: 249.4K · Output: 24K · Cached: 1.1M Review guidance: REVIEW.md from base branch |
iscekic
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add gated Gastown control/runtime credentials and Wasteland browser/server control credentials and current account, pepper, ownership, and organization checks. Matching explicit null peppers remain valid without initialization. Legacy renewal preserves the town owner and checks concurrent authorization changes before publishing a replacement token.
Wasteland token issuance and server-side upstream resolution use the same source-authority checks. DoltHub token acquisition continues to use its internal secret and OAuth credentials, not the Wasteland control token.
Extracted from #5976, which originated in the token-issuance implementation in #5857.
Verification
No manual application or live CLI/container smoke tests were run. This extraction was verified with automated suites and source comparison; deployed runtime verification remains required before activation.
Visual Changes
N/A
Reviewer Notes
GASTOWN_RESOURCE_TOKENS_ENABLEDfalseWASTELAND_RESOURCE_TOKENS_ENABLEDfalseSHARED_RESOURCE_TOKENS_ENABLEDEach family requires its own Web flag and
SHARED_RESOURCE_TOKENS_ENABLEDto be exactlytrue. LeaveGASTOWN_RESOURCE_TOKENS_ENABLEDoff: Gastown is EOL, no activation is required, and the blockers below remain. KeepWASTELAND_RESOURCE_TOKENS_ENABLEDoff until its browser/server consumer chain is verified. Preserve the existing master setting for other families. This PR requires no Gastown Cloudflare Worker toggle.Wasteland source-authority checks apply even with its issuance flag off; previously issued modern device credentials can receive bounded control credentials during rollback. Wasteland readers do not provide universal immediate pepper revocation. These are not changed into broader recovery guarantees by this extraction.
Wasteland extraction validation: 45 focused Web/authority tests and 126 Wasteland service tests passed, plus full Web typecheck, Web lint, changed-file formatting, and diff checks. Existing Gastown implementation remains unchanged; the two Wasteland source files are preserved exactly from #5976, with added adapter regression tests.
After merging current main and resolving the Town renewal conflict: 130 focused Gastown unit tests and 20 Durable Object identity/renewal tests passed, plus Gastown typecheck, lint, formatting, and diff checks. Guarded renewal and the Wasteland extraction are preserved.